import request from '@/utils/request'

// 查询活动信息培训列表
export function listTraining(query) {
  return request({
    url: '/activity/training/list',
    method: 'get',
    params: query
  })
}

export function listTrainingPublic(query) {
  return request({
    url: '/activity/training/getActivityOneList',
    method: 'get',
    params: query
  })
}

export function listTrainingOrgId(query) {
  return request({
    url: '/activity/training/listOrgId',
    method: 'get',
    params: query
  })
}
// 根据客户id查询活动信息培训列表
export function listTrainingByEnterpriseId(query) {
  return request({
    url: '/activity/training/listByEnterpriseId',
    method: 'get',
    params: query
  })
}
export function publicList(query) {
  return request({
    url: '/activity/training/publicList',
    method: 'get',
    params: query
  })
}

// 查询活动信息培训详细
export function getTraining(activityId) {
  return request({
    url: '/activity/training/' + activityId,
    method: 'get'
  })
}

// 新增活动信息培训
export function addTraining(data) {
  return request({
    url: '/activity/training',
    method: 'post',
    data: data
  })
}

// 修改活动信息培训
export function updateTraining(data) {
  return request({
    url: '/activity/training',
    method: 'put',
    data: data
  })
}

// 删除活动信息培训
export function delTraining(activityId) {
  return request({
    url: '/activity/training/' + activityId,
    method: 'delete'
  })
}

//审核活动
export function examine(data) {
  return request({
    url: '/activity/training/updateStatus/examine',
    method: 'post',
    data: data
  })
}

// 接收方查询活动信息培训列表
export function listTrainingRevice(query) {
  return request({
    url: '/activity/training/receive/list',
    method: 'get',
    params: query
  })
}

// 审核方查询活动信息培训列表
export function listTrainingExamine(query) {
  return request({
    url: '/activity/training/examine/list',
    method: 'get',
    params: query
  })
}

// 接收方报名
export function receiveApplication(activityId) {
  return request({
    url: '/activity/training/receive/application/' + activityId,
    method: 'get'
  })
}

// 查询企业报名详情
export function receptionList(query) {
  return request({
    url: '/activity/training/reception/list',
    method: 'get',
    params: query
  })
}

// 查询企业报名详情
export function regiList(query) {
  return request({
    url: '/activity/training/regi/list',
    method: 'get',
    params: query
  })
}

//评分
export function updateScore(data) {
  return request({
    url: '/activity/training/score',
    method: 'post',
    data: data
  })
}

//审核终止
export function endStatus(data) {
  return request({
    url: '/activity/training/termination',
    method: 'post',
    data: data
  })
}
//展示相关内容
export function getFiveActivity(query) {
  return request({
    url: '/activity/training/getFiveActivity',
    method: 'get',
    params: query
  })
}


